#include "process.h"

double total =1024.0;
double speed=1.0;

void DownLoad()
{
  double current=0;
  while(current<=total)
  {
    FlushProcess(total,current);
    //下载代码
    usleep(3000);//充当下载数据
    current+=speed;
  }
  printf("\ndownload %.2lf MB Done\n",total);
}
//int main()
//{
//  //process_v1();
//  //  DownLoad();
//  //  DownLoad();
//  //  DownLoad();
//  //  DownLoad();
//  //  DownLoad();
//  //  DownLoad();
//  return 0;
//}

#include <stdio.h>
int Sum(int s, int e)
{
 int result = 0;
 for(int i = s; i <= e; i++)
 {
 result += i;
 }
 return result;
}
int main()
{
 int start = 1;
 int end = 100;
 printf("I will begin\n");
 int n = Sum(start, end);
 printf("running done, result is: [%d-%d]=%d\n", start, end, n);
 return 0;
}

